const App = {
    mixins: [Save],//配置文件，路径/utils/mixins.js
    data() {
        return {
            photo,
            dataForm: {},
            agricultural_machinery_category:[],
            data1:[],data2:[],

        };
    },
    mounted() {

    },
    methods: {
        getData(){
            $.ajax({
                headers: requestHeaders(),
                url: `${mh}/generalBusiness/generalQueryBySQLSerialNumber`,
                method: "post",
                data: {
                    SQLSerialNumber: 't_agricultural_machinery',
                    Condition: window.btoa(unescape(encodeURIComponent("%%,%%,%%,%%"))),
                    ExtensionCondition: window.btoa(unescape(encodeURIComponent("AND agricultural_machinery.Agricultural_Machinery_SerialNumber = '" + this.nodeKey + "'")))
                },
                success: (res) => {
                    this.dataForm = res[0]
                    console.log(this.dataForm);
                },
                complete: (XMLHttpRequest) => {
                    requestPretreatment(XMLHttpRequest)
                },
            })
            $.ajax({
                headers: requestHeaders(),
                url: `${mh}/generalBusiness/generalQueryByTableName`,
                method: "post",
                data: {
                    Data: 'agricultural_machinery_image',
                    Condition: ` Agricultural_Machinery_SerialNumber = '${this.nodeKey}' AND  Row_Status='0'`,
                },
                success: (res) => {
                    console.log(res);
                    this.data1 = res.filter(i=>i.Image_Type == 'M');
                    this.data2 = res.filter(i=>i.Image_Type == 'D')
                },
                complete: (XMLHttpRequest) => {
                    requestPretreatment(XMLHttpRequest)
                },
            });
        }
    },
};
const { createApp, ref } = Vue;
const app = createApp(App);
app.use(ElementPlus);
//这种方式是引入全部图标，无需单个引入
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}
app.component('yl-upload', ylUpload);
app.component('yl-text-editor', ylTextEditor);
const ElMessage = ElementPlus.ElMessage;
app.mount("#app");
